// priority: 0

// Visit the wiki for more info - https://kubejs.com/

console.info('Hello, World! (Loaded server scripts from rice-v0.0.2)')
//rice
ServerEvents.recipes(event => {
    event.shaped("1x kubejs:rice_core", [
		' W ',
		'WDW',
		' W '
	], {
		D: 'minecraft:iron_ingot',
		W: 'minecraft:wheat'
    });
	event.shaped("1x kubejs:rice_upgrade_core", [
		'SWS',
		'WDW',
		'SWS'
	], {
		D: 'minecraft:iron_ingot',
		W: 'minecraft:wheat',
        S: 'minecraft:amethyst_shard'
    });
	//event.recipes.mekanism.metallurgic_infusing('kubejs:rice_hard_wheat', 'minecraft:nether_quartz', 'mekanism:redstone', 240)
});
//cobbleforday
ServerEvents.recipes(event => {
	event.remove({output:'cobblefordays:tier_1'})//移除
    event.remove({output:'cobblefordays:tier_2'})//移除
	event.remove({output:'cobblefordays:tier_3'})//移除
	event.remove({output:'cobblefordays:tier_4'})//移除
	event.remove({output:'cobblefordays:tier_5'})//移除
    event.shaped("1x cobblefordays:tier_1", [
		'WSW',
		'ADB',
		'WWW'
	], {
		D: '#forge:glass',
		W: '#minecraft:logs',
        S: 'kubejs:rice_core',
		A: 'minecraft:water_bucket',
		B: 'minecraft:lava_bucket'
    });
	event.shaped("1x cobblefordays:tier_2", [
		'WSW',
		'ADB',
		'WWW'
	], {
		D: '#forge:glass',
		W: '#forge:cobblestone',
        S: 'kubejs:rice_core',
		A: 'minecraft:water_bucket',
		B: 'minecraft:lava_bucket'
    });
	event.shaped("1x cobblefordays:tier_3", [
		'WSW',
		'ADB',
		'WWW'
	], {
		D: '#forge:glass',
		W: 'minecraft:iron_ingot',
        S: 'kubejs:rice_core',
		A: 'minecraft:water_bucket',
		B: 'minecraft:lava_bucket'
    });
	event.shaped("1x cobblefordays:tier_4", [
		'WSW',
		'ADB',
		'WWW'
	], {
		D: '#forge:glass',
		W: 'minecraft:gold_ingot',
        S: 'kubejs:rice_upgrade_core',
		A: 'minecraft:water_bucket',
		B: 'minecraft:lava_bucket'
    });
	event.shaped("1x cobblefordays:tier_5", [
		'WSW',
		'ADB',
		'WWW'
	], {
		D: '#forge:glass',
		W: 'minecraft:diamond',
        S: 'kubejs:rice_upgrade_core',
		A: 'minecraft:water_bucket',
		B: 'minecraft:lava_bucket'
    });
});
//mek
ServerEvents.recipes((event) => {
	//['mekanism:metallurgic_infuser', 'minecraft:redstone', 'minecraft:iron_ingot', 'mekanism:ingot_osmium']
	//冶金灌注机
	event.remove({output:'mekanism:metallurgic_infuser'})//移除
	event.recipes.create.mechanical_crafting('mekanism:metallurgic_infuser', [
    ' III ',
    'IOROI',
    'IRFRI',
    'IOKOI',
    ' III '
  ], {
    R: 'minecraft:redstone',
	I: 'minecraft:iron_ingot',
	O: 'mekanism:ingot_osmium',
	F: 'minecraft:furnace',
	K: 'kubejs:rice_core'
  })
  	//钢制机器外壳
	//['mekanism:energized_smelter', '2x mekanism:ingot_steel', 'mekanism:steel_casing', '48x mekanism:ingot_steel', '56x mekanism:ingot_osmium']
	event.remove({output:'mekanism:steel_casing'})
	event.recipes.create.mechanical_crafting('mekanism:steel_casing', [
		'IAAAI',
		'AOOOA',
		'AOROA',
		'AOKOA',
		'IAAAI'
	  ], {
		R: '#forge:glass',
		I: 'mekanism:ingot_steel',
		O: 'mekanism:ingot_osmium',
		A: 'create:andesite_alloy',
		K: 'kubejs:rice_core'
	  }).modifyResult((InputItem,OutputItem) => {
		if(Math.random() > 0.7 ){
			return OutputItem;
		} else {
			return '4x mekanism:steel_casing'
		}
	  }
	)
	//喷气背包
	//['mekanism:jetpack', 'mekanism:jetpack_armored'] ['mekanism:ingot_tin', 'mekanism:basic_chemical_tank', 'mekanism:basic_control_circuit']
	event.remove({output:'mekanism:jetpack'})
	event.remove({output:'mekanism:jetpack_armored'})
	event.shaped("1x mekanism:jetpack", [
		'DSD',
		'DWD',
		'ADA'
	], {
		D: 'mekanism:ingot_tin',
		W: 'mekanism:basic_chemical_tank',
        S: 'kubejs:rice_core',
		A: 'mekanism:basic_control_circuit',
    });
	//['mekanism:dust_diamond', 'mekanism:ingot_bronze', 'mekanism:block_steel']
	event.shaped("1x mekanism:jetpack_armored", [
		'WSW',
		'ABA',
		' D '
	], {
		D: 'mekanism:jetpack',
		W: 'mekanism:dust_diamond',
        S: 'kubejs:rice_core',
		A: 'mekanism:ingot_bronze',
		B: 'mekanism:block_steel'
    });
	//控制电路
	//['mekanism:basic_control_circuit', 'mekanism:advanced_control_circuit', 'mekanism:elite_control_circuit', 'mekanism:ultimate_control_circuit']
	//['mekanism:alloy_infused', 'mekanism:alloy_reinforced', 'mekanism:alloy_atomic']
	event.remove({output:'mekanism:advanced_control_circuit'})
	event.remove({output:'mekanism:elite_control_circuit'})
	event.remove({output:'mekanism:ultimate_control_circuit'})
	event.recipes.create.deploying("mekanism:advanced_control_circuit", [
		"mekanism:basic_control_circuit",
		"mekanism:alloy_infused"
	])
	event.recipes.create.deploying("mekanism:elite_control_circuit", [
		"mekanism:advanced_control_circuit",
		"mekanism:alloy_reinforced"
	])
	event.recipes.create.deploying("mekanism:ultimate_control_circuit", [
		"mekanism:elite_control_circuit",
		"mekanism:alloy_atomic"
	])
})

